package com.sq.partner.manager.service;

import java.io.InputStream;
import java.util.List;
import java.util.Map;

import com.sq.partner.manager.common.Result;
import com.sq.partner.manager.mybatis.model.CoreDept;
import com.sq.partner.manager.mybatis.model.GatewayManual;
import com.sq.partner.manager.mybatis.model.GatewayTrans;
import com.sq.partner.manager.mybatis.model.GatewayUser;
import com.sq.partner.manager.mybatis.model.NocarPlan;
import com.sq.partner.manager.util.Page;

public interface IGatewayDataManageService {

	/**
	 * 查询当前登录用户权限下的channelInfo所关联的List<GatewayApp>
	 * @param app
	 * @return
	 * @throws Exception
	 */
	public List<CoreDept> queryDeptList(GatewayUser user) throws Exception; 
	
	/**
	 * 条件查询trans
	 * @param trans
	 * @param pageIndex
	 * @param user
	 * @return
	 * @throws Exception
	 */
    public Page queryTransByCriteria(GatewayTrans trans, Integer pageIndex, GatewayUser user) throws Exception;
    
    /**
	 * 条件查询trans
	 * @param trans
	 * @param pageIndex
	 * @param user
	 * @return Map
	 * @throws Exception
	 * @author 王雁
	 * @date 2015年5月6日10:46:56
	 */
    public Map queryTransMapByCriteria(GatewayTrans trans, Integer pageIndex, GatewayUser user) throws Exception;
    /**
     * 解析对账文件
     * @param inputStream
     * @return List<GatewayManual>
     * @throws Exception
     */
    public List<GatewayManual> readReconciliationXls(InputStream inputStream) throws Exception;
    
    /**
     * 对账
     * @param manualList
     * @param user
     * @return
     * @throws Exception
     */
    public Map<String,Integer> reconciliation(List<GatewayManual> manualList,GatewayUser user) throws Exception;
    
	Page<CoreDept> queryPageForCoreDept(Page<CoreDept> page,String parentCode) throws Exception;
	
	Page<NocarPlan> queryPageForInsurePlanList(Page<NocarPlan> page,String channelCode) throws Exception;
	public Result  reconciled(GatewayTrans gatewayTrans) throws Exception;
	public Result  policyCancel(GatewayTrans gatewayTrans) throws Exception;
}
